Allow max_workers to be passed in after evaluator is created#107
Merged
Conversation
5 tasks
nathan-weinberg
approved these changes
Sep 12, 2024
nathan-weinberg
left a comment
Member
There was a problem hiding this comment.
One question but otherwise LGTM - thanks @danmcp!
Contributor
|
This pull request has merge conflicts that must be resolved before it can be |
The reason this is necessary is serving_gpus might not be available when the evaluator is constructed. A typical flow might be: - Create evaluator - Launch server # This is when serving_gpus is probably calculated - generate - judge The new logic allows for max_workers and serving_gpus to be passed in as the generate and judge steps occur. Once all the known callers have been updated (eval and training) we can remove the two attrs from the constructors and make the logic a little simpler. Signed-off-by: Dan McPherson <dmcphers@redhat.com>
alinaryan
approved these changes
Sep 23, 2024
mergify Bot
added a commit
to instructlab/instructlab
that referenced
this pull request
Sep 26, 2024
This capability takes advantage of the feature from the eval library which tunes max_workers according to the hardware configuration. In order to accomplish this, effective gpus and max_workers="auto" needs to be passed to eval. To accomplish this, gpus and effective gpus needed to be calculate earlier in the process. This change also updates training to use get_gpus and max_workers=auto. This means training now uses the gpu settings of evaluate when calling evaluate before defaulting to all gpus if not specified. Resolves: #2079 instructlab/eval#107 is now released enabling this change. **Checklist:** - [ ] **Commit Message Formatting**: Commit titles and messages follow guidelines in the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/#summary). - [ ] [Changelog](https://github.com/instructlab/instructlab/blob/main/CHANGELOG.md) updated with breaking and/or notable changes for the next minor release. - [ ] Documentation has been updated, if necessary. - [x] Unit tests have been added, if necessary. - [ ] Integration tests have been added, if necessary. Approved-by: nathan-weinberg Approved-by: alimaredia
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The reason this is necessary is serving_gpus might not be available when the evaluator is constructed. A typical flow might be:
The new logic allows for max_workers and serving_gpus to be passed in as the generate and judge steps occur.
Once all the known callers have been updated (eval and training) we can remove the two attrs from the constructors and make the logic a little simpler.
Corresponding cli change: instructlab/instructlab#2144
This change will need to be released first.